
var req=null;
var vmessage=null;
var vname=null;
var basePath=null;
var aid=null;
function note()
{
	$.post(basePath+"/comment/addComment.dch","ac.username="+vname+"&ac.comment="+vmessage+"&id="+aid,function(response){
		split(1,aid);
	})
}
function split(currentPage,albumid)
{
	$.post(basePath+"/comment/commentList.dch","currentPage="+currentPage+"&id="+albumid,function(response){
		document.getElementById("change").innerHTML=response;
	})
}

function notecheck(path,id)
{
	aid=id;
	basePath=path;
	var namenull=$("#namenull");
	var oEditor = FCKeditorAPI.GetInstance('message') ;
	vmessage=oEditor.EditorDocument.body.innerHTML;
	vname=document.getElementById("nameid").value;
	if(vmessage.length>900||vname.length>20)
	{
		namenull.html("<font color='red'>填写内容过长！<font>");
	}
	else
	{
		namenull.html("");
		if(vname.length<=0||vmessage.length<=0)
		{
			namenull.html("<font color='red'>请填写完整！</font>");
		}
		else
		{
			namenull.html("");
			document.getElementById("nameid").value="";
			FCKeditorAPI.GetInstance('message').EditorDocument.body.innerHTML="";
			note();
		}
	}
	
}